#ifndef ASTAR
#define ASTAR

#include <iostream>
#include <sstream>
#include <cmath>
#include <chrono>
#include <queue>
#include <unistd.h>
#include <ros/ros.h>
#include <tf/tf.h>
#include <tf/transform_listener.h>
#include <nav_msgs/OccupancyGrid.h>
#include <nav_msgs/Path.h>
#include <geometry_msgs/PointStamped.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/Quaternion.h>
#include <geometry_msgs/PolygonStamped.h>
#include "std_msgs/String.h"
#include "std_msgs/Int32.h"

// int astar(float sx, float sy, float gx, float gy);
class Node2D
{
public:
    Node2D() {};

    Node2D(float x, float y, float cost, int pind)
    {

        this->x = x;
        this->y = y;
        this->cost = cost;
        this->g_cost = 0;
        this->pind = pind;
    }

    float get_x() const { return x; }

    float get_y() const { return y; }

    float get_cost() const { return cost; }

    float get_g_cost() const { return g_cost; }

    int get_pind() const { return pind; }

    void set_g_cost(float g_cost) { this->g_cost = g_cost; }

private:
    float x; // x co-ordinate of the node
    float y; // y co-ordinate of the node
    float cost; // cost of the node
    float g_cost; // g cost of the node
    int pind; // parent index of the node
};

#endif